package com.minhua.jijiehao2.mainframe.common.channeldetailactivity.impl

import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.ChannelBean
import com.minhua.jijiehao2.http.*
import com.minhua.jijiehao2.mainframe.common.channeldetailactivity.imp.IChannelDetailModel

class ChannelDetailModel : IChannelDetailModel {
    override fun getLoanDetail(map: ParamsMap, callBack: CallBack<ChannelBean>) {
        HttpController<ChannelBean>().doHttp(
                ApiClient.getInstance().api.getLoanDetail(map.toRequestBody()),
                object : BaseSubscriber<ChannelBean>() {
                    override fun dealData(t: BaseBean<ChannelBean>) {
                        super.dealData(t)
                        callBack.onSuccess(t)
                    }
                }
        )
    }
}